Release 10.1A: OpenEdge Development:
Programming Interfaces
Restrictions on property and method references
Progress supports most features necessary to reference COM object properties and methods. However, there are some restrictions:
Parentheses on method calls
In general, you must specify all method references with parentheses. Although some COM objects accept a method call referenced without parentheses, Progress is not aware that such a reference is a method call. Without parentheses, the compiler interprets the reference as a property rather than as a method. This can cause unpredictable results for the method call.
Named method parameters
The COM standard allows named method parameters that you can specify in any order for a method call. Progress does not support named parameters in any form. The first line of this example shows an illegal named parameter, where the Filename parameter is passed to the SaveAs method on an Excel Workbook handle:
The second line shows the form that Progress accepts. In general, whether or not you omit optional parameters, you must pass all method parameters in the correct parenthesized order.
Default properties and methods
The COM standard allows for default properties and methods. For any COM object, the default property or method is invoked when you reference only the COM object handle. For example, Item is the default (indexed) property for collection objects. However, Progress requires that you specify all properties and methods you want to reference, whether or not they are defaults for the COM object:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |